﻿using AMInstantMessagingServerAPIModel;
using BaseSimpleAPI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AMInstantMessagingServerAPICall
{
    public class UserControllerCall : BaseControllerCall<UserEidtModel, UserViewModel>
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public StatusData Login(LoginEditModel model)
        {
            return NetCall<StatusData<LoginViewModel>>(GetUrl("Login"), new { model = model });
        }

        /// <summary>
        /// 注册账户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public StatusData Register(RegisterModel model)
        {
            return NetCall<StatusData<LoginViewModel>>(GetUrl("Register"), new { model = model });
        }
    }
}
